
package com.microweb.toastmaster.dao;

import java.util.List;

import com.microweb.toastmaster.dao.Dao;
import com.microweb.toastmaster.model.TMRole;

public interface TMRoleDao extends Dao {

    /**
     * Retrieves all of the tMRoles
     */
    public List getTMRoles(TMRole tMRole);

    /**
     * Gets tMRole's information based on primary key. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if 
     * nothing is found.
     * 
     * @param id the tMRole's id
     * @return tMRole populated tMRole object
     */
    public TMRole getTMRole(final Long id);
    
    public TMRole getTMRoleByName(final String rolename) throws Exception;

    /**
     * Saves a tMRole's information
     * @param tMRole the object to be saved
     */    
    public void saveTMRole(TMRole tMRole);

    /**
     * Removes a tMRole from the database by id
     * @param id the tMRole's id
     */
    public void removeTMRole(final Long id);
}

